<?php
namespace app\api\model;

use think\Model;
use think\db;

class Userwater extends Model
{
    public function index($userid,$style)
    {
        error_reporting(0);
        $data = Db::name('userwater')->where(['userid'=>$userid,'style'=>$style])->select();
        if(count($data)==0)
        {
            return 0;
        }
        else
        {
            return $data;
        }
    }
}